<admintpl file="header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('Admin/News/index')}">新闻列表</a></li>
        <li class="active"><a>{$Title}详情</a></li>
        <li ><a href="{:U("Admin/NewsComment/index",array("newsId"=>$_GET["newsId"]))}">新闻评论列表</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form"  >
        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">关键字：</label>
            <div class="span3">
                {$news['keyWords']}
            </div>
        </div>
        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">新闻标题：</label>
            <div class="span3">
                 {$news['title']}
            </div>
        </div>
        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">路径：</label>
            <div class="span3">
                 {$news['linkUrl']}
            </div>
        </div>
        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">作者：</label>
            <div class="span3">
                 {$news['author']}
            </div>
        </div>


        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">新闻分类：</label>
            <div class="span3">
                {$news['categoryName']}
            </div>
            <label class="span1 control-label" style="width: 90px;">分类标签：</label>
            <div class="span3">
                {$news['newsTag']}
            </div>
        </div>
        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">所属地区：</label>
            <div class="span3">
                {$news['province']}
            </div>
            <div class="span3">
                {$news['city']}
            </div>
        </div>
        <div class="control-group">
            <label class="span1 control-label" style="width: 90px;">标题图片：</label>
            <div style="padding-left: 130px;text-align: left;">

                    <img src="{$news['titleImg']}" id="imageUrl_preview" width="135"
                         style="cursor: hand"/>
            </div>
        </div>
        <div class="form-actions" style="padding-left:260px;">
            <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
        </div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var flag = true;
        $('#province').change(function () {
            $.get('{:U("Admin/News/getCity")}' + '&pid=' + $('#province').val(), function (data) {
                var html = '<option value="0">--无--</option>';
                if (data['state'] == "success") {
                    html = '<option value="0">全部</option>';
                    for (var a in data.data) {
                        html += '<option value="' + data.data[a].aId + '">' + data.data[a].aN + '</option>';
                    }
                }
                $('#city').html(html);
                if (flag) {
                    $('#city').val({$news['areaId']});
                }
                flag = false;
            });
        });
        $('#province').val({$news['provinceId']});
        $('#province').change();

        var cateFlag=true;
        $('#category').change(function () {
            $.get('{:U("Admin/News/getTags")}' + '&cId=' + $('#category').val(), function (data) {
                var html = '<option value="0">--无--</option>';
                if (data['state'] == "success") {
                    html = '<option value="0">全部</option>';
                    for (var a in data.data) {
                        html += '<option value="' + data.data[a].tagName + '">' + data.data[a].tagName + '</option>';
                    }
                }
                $('#tags').html(html);
                if (cateFlag) {
                    $('#tags').val("{$news['newsTag']}");
                }
                cateFlag = false;
            });
        });
        $('#category').val({$news['categoryId']});
        $('#category').change();
    });
</script>
</body>
</html>